Field
The disclosed embodiments relate to techniques for logging events for a software program. More specifically, the disclosed embodiments relate to techniques for lazily logging events from components of a software program.
Related Art
Logging, which refers to the act of recording interesting and/or important events that occur during the execution of a software program to a log, is generally a useful feature to include in a software program. Developers of the software program may use messages recorded within the log to debug the software program and/or track the software program's performance.
In some cases, however, components of the software program may log events at inappropriate times in the software program's execution. If a component attempts to log an event prior to the initialization of a logging component of the software program, the component may cause the software program to crash and/or experience other unexpected side effects.
Hence, what is needed is a logging component that allows other software components to log events at various points during the software program's execution without causing unexpected side effects.